fix: resolve symlinks in runtime bin scripts - #43
Merged
Conversation
vks-archastro
force-pushed
the
fix/cli-symlink-resolution
branch
from
August 31, 2026 19:48
3757431 to
6bab60a
Compare
vks-archastro
force-pushed
the
fix/cli-symlink-resolution
branch
from
August 31, 2026 19:51
6bab60a to
86aee2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review on ArchCode
Problem and author intent
Global npm installations (
npm install -g @archastro/redline) create symbolic links in the environment's bin directory pointing tonode_modules/@archastro/redline/runtime/bin/*.redline-sidecarwas previously updated with areadlinkloop to resolve symlinks before deriving its$HEREpath, butredline-pull,redline-watch, andredline-tailstill used$(dirname "$0")/... When executed via global PATH symlinks, this evaluated to the parent of the bin folder (e.g. the Node installation root) rather than the package root, crashing withMODULE_NOT_FOUNDforlib/cli-http.js.The author intent is to ensure all global CLI binaries resolve symlinks to their canonical package location so that end-users and agent skills invoking
redline-pullcan communicate with the local helper daemon without path resolution failures.What changed
while [ -L "$SCRIPT" ]) toruntime/bin/redline-pull,runtime/bin/redline-watch, andruntime/bin/redline-tail.tests/cli-auth.test.jsvalidating thatredline-pull,redline-tail,redline-sidecar, andredline-clearexecute cleanly when invoked through symbolic links..changeset/fix-cli-symlink-resolution.md.Scope indicator
Backend / CLI / tooling only. The Chrome Web Store extension code is completely untouched.
Risk assessment
Low. Reuses the exact symlink resolution pattern already proven and tested in
redline-sidecar.User impact
Users who install
@archastro/redlineglobally can now invokeredline-pull,redline-watch, andredline-taildirectly from their terminal or coding agents without hitting module loading errors.Testing
tests/cli-auth.test.js->runtime bin scripts resolve module paths when invoked via symlinkspasses.npm run check:syntax,npm run check:versions, andnpm pack --dry-runall pass.